package com.jr.dao.impl;

import com.jr.dao.UserDao;
import com.jr.entity.User;
import com.jr.util.DAO;

/**
 * @Function：用户相关的sql语句
 * @Author 梁明哲
 * @Email 424577090@qq.com
 * @Package com.jr.dao.impl
 * @Project InvoiceManage
 * @Date 2023-02-20 08:47:58
 */
public class UserDaoImpl extends DAO<User> implements UserDao {
    /**
     * 根据用户账号在数据库查找
     *
     * @param account 账户,用户注册的账户
     * @return
     * @throws Exception sql语句问题
     */
    @Override
    public User findUsersByAccount(String account) throws Exception {
        String sql = "SELECT id,name,enterprise_id AS enterpriseId,account,password FROM user WHERE account=?";
        return get(sql,account);
    }
}







